<!DOCTYPE html>
<html>
<head>
    <th:block th:include="include :: headermain('互助保障系统V3')"/>


</head>
<body>
<div class="page">
    <th:block th:include="include :: top"/>

    <div class="center">
        <div class="page-content page-wrap">
            <th:block th:include="include :: left"/>
            <div class="page-wrap-container">
                <div class="page-account">
                    <div class="page-tab">
                        <a href="/unit/account">基本资料</a>
                        <a class="on" href="/unit/resetPasswordForm">登录密码</a>
                        <a href="/unit/weChat">微信绑定</a>
                    </div>
                    <div class="page-tab-content" style="display:block;">

                        <form class="page-form">
                            <input type="hidden" name="id" value="${hzUnit.id}"/>
                            <div class="page-form-item">
                                <div class="page-form-label">旧密码：</div>
                                <div class="page-form-input">
                                    <input type="password" style="width:150px" name="oldpassword"/>
                                </div>
                            </div>
                            <div class="page-form-item">
                                <div class="page-form-label">新密码：</div>
                                <div class="page-form-input">
                                    <input type="password" style="width:150px" name="newpassword"/>
                                </div>
                            </div>
                            <div class="page-form-item">
                                <div class="page-form-label">确认密码：</div>
                                <div class="page-form-input">
                                    <input type="password" style="width:150px" name="confirmpassword"/>
                                </div>
                            </div>
                            <div class="page-form-item">
                                <div class="page-form-label"></div>
                                <div class="page-form-input">
                                    <a class="layui-btn">立即修改</a>
                                </div>
                            </div>
                        </form>

                    </div>
                </div>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer"/>
</div>

<script src="/footerjs.js"></script>


<script type="text/javascript">
    $(".layui-btn").click(function () {
        $("#page-form").serialize()

        $.ajax({
            url: "/unit/resetPassword",
            data: $(".page-form").serialize(),
            success: function (data) {
                if (data.success) {
                    layer.msg("更新成功");
                } else {
                    layer.msg(data.msg);
                }
            }
        });
    });


</script>

</body>
</html>
